package bd.proiect;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class ViewFamily extends Activity{

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.viewfamily);
		
		String info= new String();
        DataBase bs = new DataBase(this);
	    try{
				bs.createDataBase();
				bs.openDataBase();
				info = bs.getFamily();
				bs.close();
		}catch(Exception e){
			info = "Could not find plant";
		}
		
  	 	TextView t2 = new TextView(this); 
 	 	t2=(TextView)findViewById(R.id.result);
 	 	t2.setText(info);
	}
}
